
<?php if ($info != null){?>

<?php echo form_open('transaction/view/'.$info->transaction_id.'/', array('method' => 'get')); ?>
<div class="searchPanel">
	<input type="text" name="search" class="textboxSearch"
		value="<?php echo $search; ?>"
		placeholder="please enter the transaction number" maxlength="10" /> <input
		type="submit" class="buttonSearch" value="search">
</div>
<?php echo form_close(); ?>
<?php }?>

<div class="titleStyle1">
	<?php 
	if ($result == null || sizeof($result)==0){
	echo 'Transaction Details';
}else{
	echo 'Branch ID#' . $info->branch_id . ' - Revenue: S$' . $info->transaction_profit;
}
?>
</div>
<?php 
if ($result == null || sizeof($result)==0){
	echo '<div class="information">';
	echo 'no transaction found.';
	echo '</div>';
}else{
	echo '<div class="waitingTable">';
	echo '<table>';
	echo '<tr>';
	echo '<td>';
	echo 'Transaction ID';
	echo '</td>';
	echo '<td>';
	echo 'Cashier ID';
	echo '</td>';
	echo '<td>';
	echo 'Item\'s Name';
	echo '</td>';
	echo '<td>';
	echo 'Item Barcode';
	echo '</td>';
	echo '<td>';
	echo 'Quantity';
	echo '</td>';
	echo '<td>';
	echo 'Total Price';
	echo '</td>';
	echo '<td>';
	echo 'Transaction Date';
	echo '</td>';
	echo '</tr>';
	foreach ($result as $trans){
		echo '<tr>';
		echo '<td>';
		echo $trans->transaction_id;
		echo '</td>';
		echo '<td>';
		echo $trans->cashier_id;
		echo '</td>';
		echo '<td>';
		echo $trans->item_name;
		echo '</td>';
		echo '<td>';
		echo $trans->item_barcode;
		echo '</td>';
		echo '<td>';
		echo $trans->transaction_quantity;
		echo '</td>';
		echo '<td>';
		echo $trans->total_price;
		echo '</td>';
		echo '<td>';
		echo $trans->transaction_date;
		echo '</td>';
		echo '</tr>';
	}
	echo '</table>';
	echo '</div>';
	echo $links;
}
?>
